package org.lys.jdbc.beta.dao;

import org.lys.jdbc.beta.RowMapper;

public interface BaseDao {
	/**
	 * @Description: 执行更新操作
	 * @Created Time: 2013-4-5 下午3:11:44
	 * @Author lys
	 * @param sql
	 * @param params
	 * @return
	 */
	public int executeUpdate(String sql,Object[] params);
	/**
	 * @Description: 更新
	 * @Created Time: 2013-4-5 下午3:12:02
	 * @Author lys
	 * @param sql
	 * @param params
	 * @return
	 */
	public int update(String sql,Object[] params);
	/**
	 * @Description: 删除
	 * @Created Time: 2013-4-5 下午3:12:13
	 * @Author lys
	 * @param sql
	 * @param params
	 * @return
	 */
	public int delete(String sql,Object[] params);
	/**
	 * @Description: 添加
	 * @Created Time: 2013-4-5 下午3:12:23
	 * @Author lys
	 * @param sql
	 * @param params
	 * @return
	 */
	public int add(String sql,Object[] params);
	/**
	 * @Description: 添加并返回Id
	 * @Created Time: 2013-4-5 下午3:12:35
	 * @Author lys
	 * @param sql
	 * @param params
	 * @return
	 */
	public Object addRtnPk(String sql,Object[] params);
	/**
	 * @Description: 查询并返回实体
	 * @Created Time: 2013-4-5 下午3:14:20
	 * @Author lys
	 * @param sql
	 * @param params
	 * @param rowMappler
	 * @return
	 */
	public Object findForObject(String sql,Object[] params,RowMapper rowMappler);
}
